package com.anjubao.parking.municipal.parkinglot.mapper;

import java.util.List;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotDto;
import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotStatDto;
import com.anjubao.parking.municipal.parkinglot.form.AreaScreeningParkingLotForm;
import com.anjubao.parking.municipal.parkinglot.form.PositionScreeningParkingLotForm;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

import com.anjubao.parking.municipal.parkinglot.model.ParkingLot;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ParkingLotMapper extends BaseMapper<ParkingLot> {


	/**
	 * 按经纬度距离筛选停车场
	 *
	 * @param form 筛选条件
	 * @return
	 */
	IPage<ParkingLot> positionScreeningParkingLot(Page page, PositionScreeningParkingLotForm form) ;



    /**
     * 按省市区筛选停车场
     *
     * @param form 筛选条件
     * @param page 分页
     * @return
     */
	IPage<ParkingLotDto> areaScreeningParkingLot(Page<ParkingLotDto> page, @Param("form") AreaScreeningParkingLotForm form, @Param("parkingLotsPercentRangeLeft")String parkingLotsPercentRangeLeft, @Param("parkingLotsPercentRangeRight")String parkingLotsPercentRangeRight);


    /**
     * 按省市区统计停车场状态
     *
     * @param form 筛选条件
     * @return
     */
	List<ParkingLotStatDto> parkingLotStatistical(AreaScreeningParkingLotForm form);
}
